﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:oobControls="clr-namespace:HugeFlow.OOB.Controls" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
    <Style TargetType="oobControls:WindowChrome">
    	<Setter Property="Foreground" Value="White"/>
        <Setter Property="Background">
        	<Setter.Value>
              	<LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                	<GradientStop Color="#FF474747"/>
                	<GradientStop Color="#FF2B2B2B" Offset="1"/>
                </LinearGradientBrush>
			</Setter.Value>
		</Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="oobControls:WindowChrome">
                    <Grid d:DesignWidth="500" d:DesignHeight="300"  d:LayoutOverrides="Width, Height">
                    	<Rectangle Stroke="Black" StrokeThickness="0" Fill="{TemplateBinding Background}"/>
                    	<Grid x:Name="OOBWindowContainer" Background="#00000000" >
                    		<Grid.ColumnDefinitions>
                    			<ColumnDefinition Width="4"/>
                    			<ColumnDefinition Width="*"/>
                    			<ColumnDefinition Width="4"/>
                    		</Grid.ColumnDefinitions>
                    		<Grid.RowDefinitions>
                    			<RowDefinition Height="4"/>
                    			<RowDefinition Height="22"/>
                    			<RowDefinition Height="*"/>
                    			<RowDefinition Height="4"/>
                    		</Grid.RowDefinitions>
                    		<StackPanel Margin="0,0,0,2" Orientation="Horizontal" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Right">
                    			<Button x:Name="MinimizeButton" Content="_" Width="20" Height="20" Canvas.ZIndex="20"/>
                    			<ToggleButton x:Name="MaximizeButton" Content="□" Width="20" Height="20" Canvas.ZIndex="20"/>
                    			<Button x:Name="CloseButton" Content="X" Width="20" Height="20" Canvas.ZIndex="20"/>
                    		</StackPanel>
                    		<ContentPresenter Margin="{TemplateBinding Padding}" Grid.Row="2" Grid.Column="1"/>
                    		<TextBlock HorizontalAlignment="Left" Margin="2,0,0,2" TextWrapping="Wrap" Text="{TemplateBinding Title}" Width="202" VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}" Grid.Column="1" Grid.Row="1" FontSize="13.333"/>
                    		<Grid Margin="0" Grid.RowSpan="4" Grid.ColumnSpan="3"/>
                    		<Rectangle x:Name="ResizeLeftHandle" Fill="Red" Stroke="Black" StrokeThickness="0" Grid.Row="1" Grid.RowSpan="2" Opacity="0"/>
                    		<Rectangle x:Name="ResizeRightHandle" Fill="Red" Stroke="Black" StrokeThickness="0" Grid.Column="2" Grid.RowSpan="2" Grid.Row="1" Opacity="0"/>
                    		<Rectangle x:Name="ResizeTopHandle" Fill="Red" Stroke="Black" StrokeThickness="0" Grid.Column="1" Opacity="0"/>
                    		<Rectangle x:Name="ResizeBottomHandle" Fill="Red" Stroke="Black" StrokeThickness="0" Grid.Column="1" Grid.Row="3" Opacity="0"/>
                    		<Rectangle x:Name="ResizeTopLeftHandle" Fill="#FF00FF04" Stroke="Black" StrokeThickness="0" Opacity="0"/>
                    		<Rectangle x:Name="ResizeTopRightHandle" Fill="#FF00FF04" Stroke="Black" StrokeThickness="0" Grid.Column="2" Opacity="0"/>
                    		<Rectangle x:Name="ResizeBottomLeftHandle" Fill="#FF00FF04" Stroke="Black" StrokeThickness="0" Grid.Row="3" Opacity="0"/>
                    		<Rectangle x:Name="ResizeBottomRightHandle" Fill="#FF00FF04" Stroke="Black" StrokeThickness="0" Grid.Row="3" Grid.Column="2" Opacity="0"/>
                    	</Grid>
                	</Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="oobControls:InstallScreen">
    	<Setter Property="Background" Value="Black"/>
		<Setter Property="Foreground" Value="White"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="oobControls:InstallScreen">
                    <Grid Background="{TemplateBinding Background}" d:DesignWidth="364" d:DesignHeight="245">
                    	<VisualStateManager.VisualStateGroups>
                    		<VisualStateGroup x:Name="InstallStateGroup">
                    			<VisualState x:Name="Installed">
                    				<Storyboard>
                    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="NotInstalledTemplate">
                    						<DiscreteObjectKeyFrame KeyTime="0">
                    							<DiscreteObjectKeyFrame.Value>
                    								<Visibility>Collapsed</Visibility>
                    							</DiscreteObjectKeyFrame.Value>
                    						</DiscreteObjectKeyFrame>
                    					</ObjectAnimationUsingKeyFrames>
                    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="InstalledTemplate">
                    						<DiscreteObjectKeyFrame KeyTime="0">
                    							<DiscreteObjectKeyFrame.Value>
                    								<Visibility>Visible</Visibility>
                    							</DiscreteObjectKeyFrame.Value>
                    						</DiscreteObjectKeyFrame>
                    					</ObjectAnimationUsingKeyFrames>
                    				</Storyboard>
                    			</VisualState>
                    			<VisualState x:Name="NotInstalled">
                    				<Storyboard>
                    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="InstalledTemplate">
                    						<DiscreteObjectKeyFrame KeyTime="0">
                    							<DiscreteObjectKeyFrame.Value>
                    								<Visibility>Collapsed</Visibility>
                    							</DiscreteObjectKeyFrame.Value>
                    						</DiscreteObjectKeyFrame>
                    					</ObjectAnimationUsingKeyFrames>
                    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="NotInstalledTemplate">
                    						<DiscreteObjectKeyFrame KeyTime="0">
                    							<DiscreteObjectKeyFrame.Value>
                    								<Visibility>Visible</Visibility>
                    							</DiscreteObjectKeyFrame.Value>
                    						</DiscreteObjectKeyFrame>
                    					</ObjectAnimationUsingKeyFrames>
                    				</Storyboard>
                    			</VisualState>
                    		</VisualStateGroup>
                    	</VisualStateManager.VisualStateGroups>
                        <Grid x:Name="NotInstalledTemplate">
                        	<Button x:Name="InstallButton" Content="{TemplateBinding InstallButtonCaption}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="10,3" FontSize="18.667" Background="Black" BorderBrush="Black" Cursor="Hand"/>
                        </Grid>
                        <Grid x:Name="InstalledTemplate" Background="Black" Visibility="Collapsed">
                        	<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="{TemplateBinding InstalledMessage}" VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}" TextAlignment="Center"/>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
